import service from '@/utils/http.js'

// 查询对应小程序的配置信息
export const index = (params) => {
  return service({
    url: 'api/Home/getAppletConfig',
    method: 'post',
    data: params
  }) 
}

// 微信小程序手机号授权登录
export const appletPhoneLogin = (params) => {
	return service({
		url: 'api/Home/appletPhoneLogin',
		method: 'post',
		data: params
	})
}

// 获取我的票券
export const getMyTicket = (params) => {
  return service({
    url: 'api/Shop/getMyTicket',
    method: 'post',
    data: params
  })
}

// 获取我的票数量
export const getMyTicketCount = (params) => {
  return service({
    url: 'api/Shop/getMyTicketNum',
    method: 'post',
    data: params
  })
}

// 获取我的会员卡数量
export const getMyCardCount = (params) => {
  return service({
    url: 'api/Shop/getMyCardNum',
    method: 'post',
    data: params
  })
}

// 获取待付款数量
export const getMyPaymentNum = (params) => {
  return service({
    url: 'api/Shop/getMyPaymentNum',
    method: 'post',
    data: params
  })
}

// 获取我的票券详情
export const getMyTicketDetail = (params) => {
  return service({
    url: 'api/Shop/getMyTicketDetail',
    method: 'post',
    data: params
  })
}

// 获取我的待付款订单
export const getMyOrder = (params) => {
  return service({
    url: 'api/Pay/getMyOrder',
    method: 'post',
    data: params
  })
}

// 获取我的卡包
export const getMyCard = (params) => {
  return service({
    url: 'api/Shop/getMyCard',
    method: 'post',
    data: params
  })
}

// 获取我的卡包详情
export const getMyCardDetail = (params) => {
  return service({
    url: 'api/Shop/getMyCardDetail',
    method: 'post',
    data: params
  })
}

// 获取我的课包
export const getMyClass = (params) => {
  return service({
    url: 'api/Shop/getMyClass',
    method: 'post',
    data: params
  })
}

// 切换学员获取课包
export const chooseStudent = (params) => {
  return service({
    url: 'api/Train/chooseStudent',
    method: 'post',
    data: params
  })
}

// 获取课节
export const getClassList = (params) => {
  return service({
    url: 'api/Train/getClassList',
    method: 'post',
    data: params
  })
}

// 我的场地 /sass-test/public/index.php/api/court/getMyCourt
export const getMyCourt = (params) => {
  return service({
    url: 'api/court/getMyCourt',
    method: 'post',
    data: params
  })
}

//场地详情  /sass-test/public/index.php/api/court/getMyCourtDetail
export const getMyCourtDetail = (params) => {
  return service({
    url: 'api/court/getMyCourtDetail',
    method: 'post',
    data: params
  })
}



//退单  /sass-test/public/index.php/api/court/Refund
export const Refund = (params) => {
  return service({
    url: 'api/court/Refund',
    method: 'post',
    data: params
  })
}

//动态码  /sass-test/public/index.php/api/bag.normal/getDynamicCode
export const getDynamicCode = (params) => {
  return service({
    url: 'api/bag.normal/getDynamicCode',
    method: 'post',
    data: params
  })
}

//卡消费记录  /sass-test/public/index.php/api/numcard/getMoneyRecord
export const getMoneyRecord = (params) => {
  return service({
    url: 'api/NumCard/getMoneyRecord',
    method: 'post',
    data: params
  })
}

//卡消费记录 /sass-test/public/index.php/api/index/getPoints
export const getPoints = (params) => {
  return service({
    url: 'api/index/getPoints',
    method: 'post',
    data: params
  })
}


//积分记录 /sass-test/public/index.php/api/index/getPointsRecord
export const getPointsRecord = (params) => {
  return service({
    url: 'api/index/getPointsRecord',
    method: 'post',
    data: params
  })
}

//退款 /sass-test/public/index.php/api/pay/refund
export const refund = (params) => {
  return service({
    url: 'api/pay/refund',
    method: 'post',
    data: params
  })
}


//扫呗退款  /sass-test/public/index.php/api/sbpay/refund
export const sbpayrefund = (params) => {
  return service({
    url: 'api/SbPay/refund',
    method: 'post',
    data: params
  })
}

//扫呗退款  /sass-test/public/index.php/api/pay/moniRefund
export const moniRefund = (params) => {
  return service({
    url: 'api/pay/moniRefund',
    method: 'post',
    data: params
  })
}

//汇总页  /sass-test/public/index.php/api/shop/getAllCards
export const getAllCards = (params) => {
  return service({
    url: 'api/shop/getAllCards',
    method: 'post',
    data: params
  })
}

//展示包类场馆
////sass-test/public/index.php/api/shop/showVenues
export const showVenues = (params) => {
    return service({
      url: 'api/shop/showVenues',
      method: 'post',
      data: params
    }) 
}

//展示包类场馆
////sass-test/public/index.php/api/Subscribe/refundNotice
export const refundNotice = (params) => {
    return service({
      url: 'api/Subscribe/refundNotice',
      method: 'post',
      data: params
    }) 
}

// /sass-test/public/index.php/api/sbpay/WxMiniAddOrder
// projectId
export const getProjectIdByAppId = (params) => {
    return service({
      url: 'api/index/getProjectIdByAppId',
      method: 'post',
      data: params
    }) 
}

// /sass-test/public/index.php/api/sbpay/WxMiniAddOrder
// 消费吗头部
export const getXiaoFeiMaTopText = (params) => {
    return service({
      url: 'api/shop/getXiaoFeiMaTopText',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/PayOverTime/getOverTime
// 超时出场界面
export const getOverTime = (params) => {
    return service({
      url: 'api/PayOverTime/getOverTime',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/PayOverTime/getOverTime
// 超时出场界面
export const postOrder = (params) => {
    return service({
      url: 'api/PayOverTime/postOrder',
      method: 'post',
      data: params
    }) 
}

////sass-test/public/index.php/api/points/detail
// 积分商品详情
export const detail = (params) => {
    return service({
      url: 'api/points/detail',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/points/getPointBySignUp
// 签到给积分
export const getPointBySignUp = (params) => {
    return service({
      url: 'api/points/getPointBySignUp',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/points/CreateExchangeOrder
// 签到给积分
export const CreateExchangeOrder = (params) => {
    return service({
      url: 'api/points/CreateExchangeOrder',
      method: 'post',
      data: params
    }) 
}

//sass-test/public/index.php/api/points/getOrder
// 我的兑换
export const getOrder = (params) => {
    return service({
      url: 'api/points/getOrder',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/points/orderDetail
// 订单详情
export const orderDetail = (params) => {
    return service({
      url: 'api/points/orderDetail',
      method: 'post',
      data: params
    }) 
}

///sass-test/public/index.php/api/points/getBanner
// 获取轮播图
export const getBanner = (params) => {
    return service({
      url: 'api/points/getBanner',
      method: 'post',
      data: params
    }) 
}

////sass-test/public/index.php/api/race/getMyEnroll
// 我的赛事
export const getMyEnroll = (params) => {
    return service({
      url: 'api/race/getMyEnroll',
      method: 'post',
      data: params
    }) 
}

/////sass-test/public/index.php/api/race/getMyEnrollDetail
// 我的赛事核销码
export const getMyEnrollDetail = (params) => {
    return service({
      url: 'api/race/getMyEnrollDetail',
      method: 'post',
      data: params
    }) 
}

//////api/shop/students
// 学员列表
export const students = (params) => {
    return service({
      url: 'api/shop/students',
      method: 'post',
      data: params
    }) 
}

///api/shop/getMyClass
// 课包列表
export const getMyClasslist = (params) => {
    return service({
      url: 'api/shop/getMyClass',
      method: 'post',
      data: params
    }) 
}

///api/bag.normal/getDynamicCode
// 课包核销码
export const getDynamiclist = (params) => {
    return service({
      url: 'api/bag.normal/getDynamicCode',
      method: 'post',
      data: params
    }) 
}
// url: '/api/shop/codes',
// 培训班消费码列表
export const codes = (params) => {
    return service({
      url: 'api/shop/codes',
      method: 'post',
      data: params
    }) 
}

// url: '/api/index/getChannelBanner',
// 广告位轮播
export const getChannelBanner = (params) => {
    return service({
      url: 'api/index/getChannelBanner',
      method: 'post',
      data: params
    }) 
}

// 转发获取积分
export const getPointsByZhuanFa = (params) => {
    return service({
      url: 'api/points/getPointsByZhuanFa',
      method: 'post',
      data: params
    }) 
}

// 课次列表
// /api/train/class_times
export const class_times = (params) => {
    return service({
      url: 'api/train/class_times',
      method: 'post',
      data: params
    }) 
}

// 教练可约时间颗粒
// GET /sass-test/public/index.php/api/coach/hour
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const hourlist = (params) => {
    return service({
      url: 'api/coach/hour',
      method: 'post',
      data: params
    }) 
}

// 约课
// GET /sass-test/public/index.php/api/coach/appoint
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const appoint = (params) => {
    return service({
      url: 'api/coach/appoint',
      method: 'post',
      data: params
    }) 
}

// 课包-服务-手机号
// GET /sass-test/public/index.php/api/train/mob
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const mob = (params) => {
    return service({
      url: 'api/train/mob',
      method: 'post',
      data: params
    }) 
}

// 课包-记录
// GET http://localhost:81/api/train/records
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const records = (params) => {
    return service({
      url: 'api/train/records',
      method: 'post',
      data: params
    }) 
}

// 课包-课时详情
// GET /sass-test/public/index.php/api/train/mob
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const hour_info = (params) => {
    return service({
      url: 'api/train/hour_info',
      method: 'post',
      data: params
    }) 
}


// 场地退回
// GET /sass-test/public/index.php/api/court/cancelBeShared
// 接口ID：64332986
// 接口地址：https://www.apifox.cn/web/project/866979/apis/api-64332986
export const cancelBeShared = (params) => {
    return service({
      url: 'api/court/cancelBeShared',
      method: 'post',
      data: params
    }) 
}


// 挂失
// POST /sass-test/public/index.php/api/kawu.EditCard/lost
// 接口ID：82050863
// 接口地址：https://app.apifox.com/project/866979/apis/api-82050863
export const lost = (params) => {
    return service({
      url: 'api/EditCard/lost',
      method: 'post',
      data: params
    }) 
}

// 解挂
// POST /sass-test/public/index.php/api/kawu.EditCard/unlost
// 接口ID：82051365
// 接口地址：https://app.apifox.com/project/866979/apis/api-82051365
export const unlost = (params) => {
    return service({
      url: 'api/EditCard/unlost',
      method: 'post',
      data: params
    }) 
}

// 补卡
// GET /sass-test/public/index.php/api/kawu.EditCard/bu
// 接口ID：82056715
// 接口地址：https://app.apifox.com/project/866979/apis/api-82056715
export const bu = (params) => {
    return service({
      url: 'api/EditCard/bu',
      method: 'post',
      data: params
    }) 
}

// 补卡记录
// GET /sass-test/public/index.php/api/kawu.EditCard/buRecord
// 接口ID：82057276
// 接口地址：https://app.apifox.com/project/866979/apis/api-82057276
export const buRecord = (params) => {
    return service({
      url: 'api/EditCard/buRecord',
      method: 'post',
      data: params
    }) 
}


// 延期
// GET /sass-test/public/index.php/api/kawu.EditCard/yanqi
// 接口ID：82113780
// 接口地址：https://app.apifox.com/project/866979/apis/api-82113780
export const yanqi = (params) => {
    return service({
      url: 'api/EditCard/yanqi',
      method: 'post',
      data: params
    }) 
}

// 取消延期
// GET /sass-test/public/index.php/api/kawu.EditCard/cancel_yanqi
// 接口ID：82114303
// 接口地址：https://app.apifox.com/project/866979/apis/api-82114303
export const cancel_yanqi = (params) => {
    return service({
      url: 'api/EditCard/cancel_yanqi',
      method: 'post',
      data: params
    }) 
}

// 延期记录
// GET /sass-test/public/index.php/api/kawu.EditCard/yanqi_record
// 接口ID：82114621
// 接口地址：https://app.apifox.com/project/866979/apis/api-82114621
export const yanqi_record = (params) => {
    return service({
      url: 'api/EditCard/yanqi_record',
      method: 'post',
      data: params
    }) 
}

// 退卡
// GET /sass-test/public/index.php/api/kawu.EditCard/refund
// 接口ID：82653289
// 接口地址：https://app.apifox.com/project/866979/apis/api-82653289
export const refund_s = (params) => {
    return service({
      url: 'api/EditCard/refund',
      method: 'post',
      data: params
    }) 
}


// 封卡
// POST /sass-test/public/index.php/api/kawu.EditCard/fengKa
// 接口ID：83659585
// 接口地址：https://app.apifox.com/project/866979/apis/api-83659585
export const fengKa = (params) => {
    return service({
      url: 'api/EditCard/fengKa',
      method: 'post',
      data: params
    }) 
}

// 解封
// POST /sass-test/public/index.php/api/kawu.EditCard/jieFeng
// 接口ID：83659769
// 接口地址：https://app.apifox.com/project/866979/apis/api-83659769
export const jieFeng = (params) => {
    return service({
      url: 'api/EditCard/jieFeng',
      method: 'post',
      data: params
    }) 
}

// 续卡待调试
// GET /sass-test/public/index.php/api/kawu.EditCard/renew
// 接口ID：82653554
// 接口地址：https://app.apifox.com/project/866979/apis/api-82653554
export const renew = (params) => {
    return service({
      url: 'api/EditCard/renew',
      method: 'post',
      data: params
    }) 
}

// 转移记录
// GET /sass-test/public/index.php/api/kawu.EditCard/shift_record
// 接口ID：85405564
// 接口地址：https://app.apifox.com/project/866979/apis/api-85405564
export const shift_record = (params) => {
    return service({
      url: 'api/EditCard/shift_record',
      method: 'post',
      data: params
    }) 
}

// 转让 Copy
// GET /sass-test/public/index.php/api/kawu.EditCard/transfer
// 接口ID：85404769
// 接口地址：https://app.apifox.com/project/866979/apis/api-85404769
export const transfer = (params) => {
    return service({
      url: 'api/EditCard/transfer',
      method: 'post',
      data: params
    }) 
}

// 别名
// GET https://sass-test.doit10019.com/api/EditCard/alias_name
// 接口ID：85404769
// 接口地址：https://sass-test.doit10019.com/api/EditCard/alias_name
export const alias_name = (params) => {
    return service({
      url: 'api/EditCard/alias_name',
      method: 'post',
      data: params
    }) 
}

export const Distribution = (params) => {
    return service({
      url: 'api/Distribution/index',
      method: 'post',
      data: params
    }) 
}
// 续充
export const renew_set_meal = (params) => {
    return service({
      url: 'api/EditCard/renew_set_meal',
      method: 'post',
      data: params
    }) 
}
// 续充付钱
export const renew_meal = (params) => {
    return service({
      url: 'api/EditCard/renew',
      method: 'post',
      data: params
    }) 
}
// 卡务权限
export const getMiniProKawuConf = (params) => {
    return service({
      url: 'api/EditCard/getMiniProKawuConf',
      method: 'post',
      data: params
    }) 
}
